package com.pz.gulimall.ware.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.pz.gulimall.common.to.LockStockResultTo;
import com.pz.gulimall.common.to.SkuHasStockTo;
import com.pz.gulimall.common.to.WareStockLockTo;
import com.pz.gulimall.common.utils.PageUtils;
import com.pz.gulimall.ware.entity.PurchaseDetailEntity;
import com.pz.gulimall.ware.entity.WareSkuEntity;
import com.pz.gulimall.ware.entity.resultMap.WareStockReleaseParam;

import java.util.List;
import java.util.Map;

/**
 * 商品库存
 *
 * @author PZ
 * @email pzs@gmail.com
 * @date 2024-02-02 11:49:35
 */
public interface WareSkuService extends IService<WareSkuEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void addStock(PurchaseDetailEntity detailEntity);

    List<SkuHasStockTo> hasStockBySkuIds(List<Long> skuIds);

    List<LockStockResultTo> lockStock(WareStockLockTo wareStockLockTo);

    void releaseStock(List<WareStockReleaseParam> releaseParams);
}

